package com.cc.service.impl;

import com.cc.dao.DeptDao;
import com.cc.dao.impl.DeptDaoImpl;
import com.cc.entity.Dept;
import com.cc.service.DeptService;
import com.cc.util.Page;

import java.util.List;

/**
 * @author 33314
 * @version 1.0
 * @description: TODO
 * @date 2025/4/17 19:27
 */
public class DeptServiceImpl implements DeptService{
    private DeptDao deptDao = new DeptDaoImpl();
    @Override
    public boolean addDept(Dept dept) {
        return deptDao.addDept(dept) > 0 ? true : false;
    }

    @Override
    public boolean deleteDept(int id) {
        return deptDao.deleteDept(id)>0 ?true : false;
    }

    @Override
    public boolean updateDept(Dept dept) {
        return deptDao.updateDept(dept)>0 ?true : false;
    }

    @Override
    public List<Dept> getDept() {
        return deptDao.getDept();
    }


}
